<!--
* @author wn
* @date 2023/03/13 17:06:19
* @description: 文字超出省略  鼠标 hover 提示
!-->
<template>
	<a-tooltip placement="topLeft">
		<!-- 提示插槽 -->
		<template #title>
			<span>{{ value }}</span>
		</template>

		<span class="ellipsis">{{ value }}</span>
	</a-tooltip>
</template>
<script setup>
defineProps({
	value: {
		type: String,
		required: false,
	},
	width: {
		type: String,
		default: '120px',
		required: false,
	},
})
</script>
<style scoped lang="less">
.ellipsis {
	display: block;
	overflow: hidden;
	width: v-bind(width);
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}
</style>
